class Person:
    def __init__(self, name, age, height):
        self.name = name
        self.age = age
        self.height = height

    def run(self):
        print("%s正在跑步..." % self.name)

    def eat(self):
        print("%s正在吃东西..." % self.name)


class Dog:
    def __init__(self, name, color):
        self.name = name
        self.color = color
    def bark(self):
        print("%s正在汪汪叫..." % self.name)

    def wagging_tail(self):
        print("%s正在摇尾巴..." % self.name)

    def __str__(self):
        return "name:%s, color:%s" % (self.name, self.color)    # 对象外打印时打印的是str的返回内容

    def __del__(self):
        print(self.name + "对象被删除了...")  # 重载析构函数

if __name__ == '__main__':
    # 对象是可变数据类型
    tiger = Person("tiger", 18, 180)
    tiger.run()
    tiger.eat()

    print("-" * 20)

    big_yellow = Dog("big_yellow", "yellow")
    big_yellow.bark()
    big_yellow.wagging_tail()
    print(big_yellow)
    del big_yellow